import request from "@/utils/request";

// 任务列表
export function getTaskPage(query) {
  return request({
    url: "/admin/sysRewardConfig/list",
    method: "get",
    params: query,
  });
}

// 删除任务
export function deleteTaskInfo(data) {
  return request({
    url: `/admin/task/${data.taskId}`,
    method: "delete",
  });
}

// 编辑任务
export function updateTaskInfo(data) {
  return request({
    url: "/admin/sysRewardConfig",
    method: "put",
    data: data,
  });
}

// 任务等级列表
export function getTaskLevelList(query) {
  return request({
    url: "/admin/task/level/list",
    method: "get",
    params: query,
  });
}

// 编辑任务等级
export function updateTaskLevel(data) {
  return request({
    url: "/admin/task/level",
    method: "put",
    data: data,
  });
}
